package com.yml.mall.carts.pojo;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.Getter;
import lombok.Setter;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;


/**
 * @ClassName CartsAddDTO
 * @Author Administrator
 * @Date 2020/4/13   16:26
 */
@Data
@Getter
@Setter
@AllArgsConstructor
@ApiModel("添加数量亲求")
public class CartsAddDTO {

    @ApiModelProperty(value = "商品ID",required = true)
    @Min(value = 0 ,message = "productId,不能小于0")
    Integer productId;

    @ApiModelProperty(value = "是否选择",required = true)
    @Min(value = 0,message = "quantity,不能小于0")
    Integer quantity;

    @NotNull(message = "selected 不能为空")
    @ApiModelProperty(value = "是否选择",required = true)
    boolean selected;

}
